import React from 'react';
// import {
// 	Route,
// 	Link
// } from 'react-router-dom';
import { getDemelist } from '@/api/user';
import './index.scss';
import { Carousel } from 'antd';
// import ajax from '@/api/public';

class Resource extends React.Component{
	constructor (props) {
		super(props)
		this.state={
			imgList: []
		}
	}
	componentDidMount () {
		getDemelist().then(res => {
			this.setState({
				imgList: res.data.list
			})
		})
	}
	render() {
		return(
			<div className='ys-fengcai ys-img home-contain' style={{paddingBottom: '50px'}}>
				{
					this.state.imgList.map((item, index) => {
						return (
							<div key={index}>
								<div className='common-title'>{item.name}</div>
								{
									item.images.map((i, ind) => {
										return (
											<img key={ind} src={i.image} alt='啦啦传媒' />
										)
									})
								}
							</div>
						)
					})
				}
			</div>
		)
	}
}
export default Resource;
